#ifndef __INC__OLED_DRIVER_H
#define __INC__OLED_DRIVER_H
#include "app_io.h"
//#include "app_graphics_dc.h"


#define APP_OLED_POWER_PIN        APP_IO_PIN_1
#define APP_OLED_POWER_TYPE       APP_IO_TYPE_GPIOC
#define APP_AVDD_POWER_PIN        APP_IO_PIN_15
#define APP_AVDD_POWER_TYPE       APP_IO_TYPE_GPIOB
#define APP_SYS_POWER_PIN        APP_IO_PIN_0
#define APP_SYS_POWER_TYPE       APP_IO_TYPE_GPIOC
#define TFT_PWM_PIN     APP_IO_PIN_1
#define TFT_PWM_PORT    APP_IO_TYPE_AON
#define OPEN_OLED_POWER 	app_io_write_pin(APP_OLED_POWER_TYPE,APP_OLED_POWER_PIN,APP_IO_PIN_RESET)
#define OPEN_AVDD_POWER 	app_io_write_pin(APP_AVDD_POWER_TYPE,APP_AVDD_POWER_PIN,APP_IO_PIN_SET)
#define OPEN_SYS_POWER 	app_io_write_pin(APP_SYS_POWER_TYPE,APP_SYS_POWER_PIN,APP_IO_PIN_SET)
#define CLOSE_SYS_POWER 	app_io_write_pin(APP_SYS_POWER_TYPE,APP_SYS_POWER_PIN,APP_IO_PIN_RESET)

void app_dspi_display_init(void);


/*******DSPI IO CONFIG***************************/
#define OLED_QSPI2_MODULE                    QSPI2
#define OLED_QSPI2_PORT                      GPIO1
#define OLED_QSPI2_GPIO_MUX                  APP_IO_MUX_0
#define OLED_QSPI2_CS_IO_TYPE                APP_IO_TYPE_GPIOB
#define OLED_QSPI2_CLK_IO_TYPE               APP_IO_TYPE_GPIOB
#define OLED_QSPI2_IO0_IO_TYPE               APP_IO_TYPE_GPIOB
#define OLED_QSPI2_IO1_IO_TYPE               APP_IO_TYPE_GPIOB
#define OLED_QSPI2_IO2_IO_TYPE               APP_IO_TYPE_GPIOB
#define OLED_QSPI2_IO3_IO_TYPE               APP_IO_TYPE_GPIOB
#define OLED_QSPI2_CS_PIN                    APP_IO_PIN_11
#define OLED_QSPI2_CLK_PIN                   APP_IO_PIN_0
#define OLED_QSPI2_IO0_PIN                   APP_IO_PIN_1
#define OLED_QSPI2_IO1_PIN                   APP_IO_PIN_2
#define OLED_QSPI2_IO2_PIN                   APP_IO_PIN_3
#define OLED_QSPI2_IO3_PIN                   APP_IO_PIN_4

void init_oled_periph(void);
#endif